package com.nextgenapp.fbgraph.util
{
	public class FbUrlUtil
	{
		public function FbUrlUtil()
		{
		}
		
		/**
		 * append access_token to url.
		 */
		public static function appendAccessToken(url:String, access_token:String):String {
			if (url.indexOf("?") == -1) {
            	url += "?";
            } else {
            	url += "&";
            } 
            url += "access_token="+access_token;
            return url;
		}
		
		/**
		 * construct a user's profile url from the user id
		 */
		public static function getProfileUrl(uid:String):String {
			return "http://www.facebook.com/profile.php?id="+uid;
		}
		
		/**
		 * get user's image url.
		 */
		public static function getUserImgUrl(uid:String):String {
			return "http://graph.facebook.com/"+uid+"/picture";
		}

	}
}